package se.wangs.observerpk;

import org.junit.Test;
import se.wangs.observerpk.impl.CurrentConditionsDisplay;

/**
 * -- coding: UTF-8 -- *
 *
 * @author wangs
 * @date 2023/12/12 17:23
 * @description 测试观察者模式
 */
public class WeatherDataTest {
    @Test
    public void test() {
        WeatherData weatherData = new WeatherData();
        CurrentConditionsDisplay currentConditionsDisplay = new CurrentConditionsDisplay(weatherData);
        weatherData.setMeasurements(80, 65, 30.4f);
        weatherData.setMeasurements(82, 70, 29.4f);
        weatherData.setMeasurements(78, 90, 29.2f);
    }
}
